# -*- coding: utf-8 -*-
# @Author: Tim Liu
# @Date: 2024-04-15
# @Last Modified by: Your Name
# @Last Modified time: 2024-04-15

# @Description: settings for aigc


"""
LANGFUSE key
"""
LANGFUSE_SECRET_KEY: str = "sk-lf-105c84f8-a234-4f46-babd-ebed1f067e12"
LANGFUSE_PUBLIC_KEY: str = "pk-lf-49fdacbf-a587-4b68-bef0-90051d5574a3"
LANGFUSE_HOST: str = "https://cloud.langfuse.com"

"""
AzureOpenAI Chat 服务默认连接
"""
OPENAI_CHAT_API_BASE = "https://crewplus-westus.openai.azure.com"
OPENAI_CHAT_API_KEY = "b93bc4d2ef8e4298bd8390002922d084"
#OPENAI_CHAT_API_BASE = "https://crewplus-japan-east.openai.azure.com"
#OPENAI_CHAT_API_KEY = "0fd048f51ef94df5a3fbc2813e7c5265"
OPENAI_CHAT_API_VERSION = "2024-05-01-preview"
OPENAI_CHAT_API_TYPE = "azure"

CHAT_TEMPERATURE = 0.1

#  TODO 开发和测试环境换连接
GPT35_DEPLOYMENT_ENGINE = "cpai-gpt35-turbo-westus"
#cpai-gpt35-turbo-jpeast
#"cpai-gpt35-turbo-sweden"
GPT35_MODEL_NAME =  "gpt-35-turbo"

# GPT4 DEPLOYMENT 
GPT4_DEPLOYMENT_ENGINE = "gpt4-turbo"
GPT4_MODEL_NAME = "gpt-4-1106-preview"

# GPT4o DEPLOYMENT 
GPT4o_API_BASE = "https://crewplus-westus.openai.azure.com"
GPT4o_API_KEY = "b93bc4d2ef8e4298bd8390002922d084"
GPT4o_API_VERSION = "2024-02-15-preview"
GPT4o_AZURE_DEPLOYMENT = "cpai-gpt4o-westus"


"""
Default settings for RAG
"""
DEFAULT_RAG_TEXT_CHUNK_OVERLAP = 100
# MILVUS_HOST = "20.51.121.143"
# MILVUS_PORT = "19530"
# MILVUS_CONNECTION_ARGS = {"host": MILVUS_HOST, "port": MILVUS_PORT, "user": "root", "password": "Cr3wp1us2024"}

# MILVUS_HOST = "127.0.0.1"
# MILVUS_PORT = "19530"
# MILVUS_CONNECTION_ARGS = {"host": MILVUS_HOST, "port": MILVUS_PORT, "user": "root", "password": ""}

ZILLIZ_CLUSTER_ENDPOINT = "https://in03-f6527be3063b5c1.serverless.gcp-us-west1.cloud.zilliz.com"
ZILLIZ_TOKEN = "eda2ab9799cae2f8f6e2df363d9685bac85c7e332455f798998f2a9c4405654257b57d3ea559b2cf4424665688fad9a7be405d98"
MILVUS_CONNECTION_ARGS = {"uri": ZILLIZ_CLUSTER_ENDPOINT, "token": ZILLIZ_TOKEN}

# TODO: change to json config
FILE_TYPE_HTML = "html"
FILE_TYPE_PDF = "pdf"
FILE_TYPE_AUDIO = "audio"
FILE_TYPE_IMAGE = "image"
FILE_TYPE_VIDEO = "video"

"""
AzureOpenAI Embedding 服务默认连接, https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#embeddings
"""
OPENAI_EMBEDDING_API_BASE = "https://crewplus-westus.openai.azure.com"
OPENAI_EMBEDDING_API_KEY = "b93bc4d2ef8e4298bd8390002922d084"
OPENAI_EMBEDDING_API_VERSION = "2024-02-01"
OPENAI_API_TYPE = "azure"

OPENAI_EMBEDDING_DEPLOYMENT = "cpai-text-embedding-ada-002-westus"
#"cpai-text-embedding-ada-002-jpeast"
#"cpai-text-embedding-ada-002-useast"
#EMBEDDING_MODEL = "text-embedding-ada-002"

"""
Default settings for Azure OAI whisper
"""
WHISPER_AZURE_OPENAI_API_KEY = "646dbd19a69e46e29060da52dc027e48"
WHISPER_AZURE_OPENAI_ENDPOINT = "https://crewplus-east-us2.openai.azure.com"
WHISPER_AZURE_OPENAI_API_VERSION = "2024-02-01"
WHISPER_AZURE_OPENAI_CHAT_DEPLOYMENT_NAME = "cpai-whisper-east-us2"


"""
Default settings for Azure Document Intelligence
"""
DOCINTEL_AZURE_OPENAI_API_KEY = "7488d1ee18c14047ba26827b6f2ddeab"
DOCINTEL_AZURE_OPENAI_ENDPOINT = "https://cpai-docintel-eastus.cognitiveservices.azure.com"


"""
Default settings for Neo4j Graph
"""
#NEO4J_GRAPH_ENDPOINT = "bolt+s://0879e6e0.databases.neo4j.io:7687" # or "neo4j://neo4j:7687"
NEO4J_USER = "neo4j"
NEO4J_GRAPH_ENDPOINT = "neo4j://neo4j:7687"
NEO4J_PASSWORD = "pass"
# NEO4J_USER = "neo4j"
# NEO4J_GRAPH_ENDPOINT = "neo4j+s://c09c7974.databases.neo4j.io"
# NEO4J_PASSWORD = "3KjTZbNRj3Y9o-p5Q4B42KG7CWP-_PQlaOcnVJKppeQ"
"""
Default settings for Message Memory Store
"""
SQLALCHEMY_MESSAGE_STORE = "mysql+pymysql://root:Sjtu403B!ertw@188.8.0.3:3306/crewplus"